<?php
require_once 'shujvku.php';
header("content-type:text/html;charset=utf-8");
$id = $_POST['id'];
$id = intval('$id');

$usename = $_POST['username'];
$sex = $_POST['sex'];
$message = $_POST['message'];
$imgurl = $_POST['imgurl'];
$time_at = time();



$sql = "
UPDATE  `xiaoming`.`t_message`
SET 
`username` =  '$usename',
`sex` =  '$sex',
`content` =  '$message',
`avater` =  '$imgurl',
`time_at` = '$time_at' 
WHERE  `t_message`.`id` =$sid 
LIMIT 1 ;
";
//echo $sql;
//die;

$result = $conn->query($sql);
print_r($result);
//$rows = $result->fetch_array(MYSQLI_ASSOC);


/*$data = array();
$data['status'] = 1;
$data['info'] = $rows;
echo json_encode($data);
header("location:index.php");*/

